package filedemo;

import java.io.File;

public class FileDemo {
    public static void main(String[] args) {


        File file = new File("C:/Users/ASUS/Desktop/Servlet_JDBC/VN2205SE/src/demo.txt");

        String getname = file.getName();
        System.out.println(getname);

        long length = file.length();
        System.out.println(length);

        boolean cr  = file.canRead();//是否可读
        boolean cw = file.canWrite();//是否可写
        boolean in = file.isHidden();//是否隐藏

        System.out.println(cr);
        System.out.println(cw);
        System.out.println(in);
    }
}
